ostree-repo: Make the lock with a long-lasting FD
authorJasper St. Pierre <jstpierre@mecheye.net>
Tue, 22 Nov 2016 00:05:55 +0000 (16:05 -0800)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 22 Nov 2016 02:32:33 +0000 (02:32 +0000)
commitfd6ba80d0734663f0b239c145d3b099ae12566ad
tree930a6d2cbb230b310a5d95b97f74b3203a515ef5
parentfbce60817727a3d48ee41e19a3427d902d15a2bc
ostree-repo: Make the lock with a long-lasting FD

glnx_make_lock_file requires that the dfd passed in survives the
lifetime of the lock. Since dfd_iter.fd gets cleaned up after the
function returns, this isn't the case. dfd_iter.fd should be equivalent
to tmpdir_dfd, since we iter on ".", and that survives past the
function, so just use that instead.

Closes: #591
Approved by: cgwalters
src/libostree/ostree-repo.c
tests/test-admin-deploy-bootid-gc.sh